<template>
	<view>
		<view class="main">
			<view class="mainItem">1</view>

		</view>


		<view class="main1">
			<view class="mainItem1">
				<text class="text1">测试边距</text>
			</view>

			<view>
				<text id="text3" v-model="user">111111</text>
			</view>
			<view>
				<button type="primary" @click="tijiao()">提交</button>
			</view>
		</view>
		
		
	</view>

</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				user: "111"
			}
		},
		onLoad() {

		},
		methods: {
			tijiao() {
				var data = document.getElementById("text3").textContent;
				var data2 = document.getElementById("text3");
				console.log(data);
				console.log(this.$u.trim(' abc '));
				
				
				// alert(data);
			},
			
			updateView(){
				var text = '{ "sites" : [' +
				    '{ "name":"Runoob" , "url":"www.runoob.com" },' +
				    '{ "name":"Google" , "url":"www.google.com" },' +
				    '{ "name":"Taobao" , "url":"www.taobao.com" } ]}';
					
					var newText=JSON.parse(text);
					console.log(newText.sites[0].name);
					document.getElementById("text3").innerText=newText.sites[0].url;
			},
			getdata(){
				// uni.request({
				// 	url:"http://www.apptg.cn/phone/chanpin/getChanPing?page=1",
				// 	success(data) {
				// 		console.log(data.data.data[0].CHANPIN_APPMINGZI);
				// 		 document.getElementById("text3").innerText=data.data.data[0].CHANPIN_APPMINGZI;
				// 	}
				// })
				
				this.$request('createCaptcha', captchaOptions, {
					functionName: 'uni-id-cf'
				}).then(res => {
					console.log("1111: "+res);
				}).catch(err => {}).finally(err => {
					this.captchaLoading = false
				})
			}
		}
	}
</script>


<style>
	.main {
		display: flex;
		width: 2000px;
		height: 200px;
		background: #999999;

	}

	.mainItem {
		justify-content: center;
		align-items: center;
		border-radius: 50%;
		width: 50px;
		height: 50px;
		background: #000;

	}




	.main1 {
		justify-content: center;
		align-items: center;
		display: flex;
		margin-top: 10px;
		display: flex;
		width: 100%;
		height: 200px;
		background: #999999;

	}

	.mainItem1 {

		width: 200px;
		height: 100px;
		padding-left: 20px;
		padding-right: 20px;
		display: flex;
		color: #007AFF;
		background: #000;

	}

	.text1 {

		overflow: hidden;
		text-overflow: ellipsis;
		display: flex;
		color: #FFFFFF;
		word-wrap: break-word;
		word-break: break-all;
		display: flex;
		align-items: center;


	}
</style>
